Basic attributes of a process: process ID, parent process ID, process group ID, session, and control terminal.Abstract:This document describes the basic attributes of a process, including process ID, parent process ID, process group ID, session, and
Basic attributes of a process: process ID, parent process ID, process group ID, session, and control terminalAbstract:This document describes the basic attributes of a process, including process ID, parent process ID, process group ID, session, and
Actual User ID (actual group ID): Identifies who the current user (belongs to) is and is taken from the password file when the user logs on.Valid user ID (valid group ID): Used to determine our (current process) access to the file (that is, the
Actual User (group) ID:Identifies who the user is, and the two fields are taken from the login entry in the password file when they log on.Valid user (group) ID:Determines access to the file, usually valid user (group) ID equals the actual user
1. Change the user ID and group ID
1.1. Set the user ID and group ID
There are 6 or more IDs associated with the process, as shown below:
Actual user ID
Who are we actually?
Actual group ID
Valid user ID
Used to
Every process has six or more IDs associated with it. These are shown in Figure 4.5.
Figure 4.5. user IDs and group IDs associated with each process
Real user IDReal group ID
Who we really are
Valid user IDValid
In the UNIX system, privileges, such as being able to change the system's notion of the current date, and access control, such as being able to read or write a particle file, are based on user and group IDs. when our programs need additional
Process Group ID operation, process group idZookeeper
Process relationship
Call format# Include
Int setpgid (pid_t pid, pid_t pgid );Pid_t getpgid (pid_t pid );
Pid_t getpgrp (void);/* POSIX.1 version */Pid_t getpgrp (psid_t pid);/* BSD version
actual User id:Some articles refer to it as the real user ID, which is the ID when we log on to the UNIX system.
Valid User ID: Defines the rights of the operator. A valid user ID is a property of a process that determines the access to the file
Transfer from http://blog.csdn.net/todd911/article/details/16370577In UNIX systems, privileges are based on user and group IDs, and when programs need to add privileges or need access to resources that are not currently allowed, we need to replace
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.